package com.wtwd.campus.jdzc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wtwd.campus.entity.Student;
import com.wtwd.campus.jdzc.entity.JdzcStudent;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author mjy
 * @date 2022/02/15
 * @description
 */
@Mapper
public interface JdzcStudentMapper extends BaseMapper<Student> {


    List<Map<String,Object>> getStuByNameAndStuNo(@Param("name") String name, @Param("stuNo") String stuNo);

    List<Map<String, Object>> getSchoolOrgCodeListByStuIdList(@Param("list") List<Integer> stuIdList);

    /**
     * 根据学生id查询学生信息
     * @param studentId
     * @return
     */
    Student getStudentInfoById(@Param("studentId") Integer studentId);

    List<Map<String,Object>> bindStudentPhoneList(@Param("studentId")Integer studentId);

    Integer updateStudentWxUserBindStatus(@Param("bindingWechat") Integer bindingWechat,@Param("studentId") Integer studentId);

    Map<String, Object> getStuBindingMessByStuId(@Param("stuId") Integer stuId);

    /**
     * 学生列表（发送指令前的查询）
     * @param userId
     * @return
     */
    @MapKey("student_id")
    List<Map<String,Object>> studentList(@Param("userId")Integer userId);

    List<String> getImeiListByStuIdList(@Param("list") List<Integer> stuIdList);

    Map<String, Object> getStudentByStuId(@Param("stuId") Integer stuId);

    List<JdzcStudent> getStudentListByClassId(@Param("classId") Integer classId);
}
